{% extends "mainapp/base.html" %}

{% load static %}
{% load bootstrap %}

{% block title %} 自动生成报告-上传文件 {% endblock %}


{% block content %}
    <h2>上传Excel文件</h2>
    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <div class="form-group">
            {{ form.file.label_tag }}
            {{ form.file }}
        </div>
        <button type="submit" class="btn btn-primary">上传</button>
    </form>

    {% if messages %}
        <ul class="mt-3">
            {% for message in messages %}
                <li class="alert alert-{{ message.tags }}">{{ message }}</li>
            {% endfor %}
        </ul>
    {% endif %}
{% endblock %}